This invention relates to an image processing device and particularly to an image processing device for performing image processing according to the type of color image. This kind of an image processing device is widely used in such fields as edition, registration, retrieval, communication and printing of a color image.
Color images handled by this kind of image processing device include natural images like a photograph, an illustration drawn by an illustrator (sketch image), character images centering on characters, and other kinds of images.
In the prior art, these color image data are not distinguished and are processed by a single compression/decompression algorithm.
FIG. 9 is a block diagram of a conventional image retrieval system. An input means, denoted by 100, inputs various kinds of color image data. A man-machine interface (MMI), denoted by 101, consists of a keyboard and a pointing device for the user to interact with the system. A calculation means (CPU), denoted by 102, performs logic operations for the registration and retrieval of various kinds of color image data and controls its own peripheral devices. An output means (CRT), denoted by 103, displays an image to be registered or retrieved image. A recording means, denoted by 104, stores image data in which data is compressed and an index file used for retrieving the image data. The recording means is composed of an optical disk device and a magnetic disk device. A memory, denoted by 105, has a storage area for color image data and a work area used by the CPU 102. A compression and decompression means for color image data, denoted by 106, compresses and decompresses color image data according to a single and common compression and decompression algorithm.
In the registration of images, color image data is input from the input means 100 and stored in the memory 105 once. The user inputs a key word which specifies the image by an interactive operation via the MMI 101. The CPU 102 registers the key word in the index file of the recording means 104, compresses the color image data by the compression and decompression means 106, and records this data in a corresponding place of the recording means 104.
In the retrieval of images, the user inputs a key word for retrieving an registered image by an interactive operation via the MMI 101. The CPU 102 reads out corresponding color image data from the recording means 104 according to the key word, makes the compression and decompression means 106 decompress this color image data according to an algorithm which is the reverse of the above-mentioned compression and displays a resulting image on the output means 103.
However, as in the prior art, if a compression/decompression algorithm for color image data is single, sufficient compression/decompression ratio cannot, depending on the kind (character) of image, be obtained. If the compression/decompression ratio of a certain kind of image is given a priority, the compression/decompression ratio of other kinds of images is sacrificed. If the aim is to satisfy the compression/decompression ratio of all kinds of images, the compression/decompression ratio as a whole is not increased.
In the prior art, there is a device which analyzes the characteristics of color image data. It makes a histogram for each of the color separations R, G and B.
However, in the method of making a histogram for each color separation data, since the information of the actual color specified among the color separations R, G and B is not taken into consideration, the analysis of shape made by color is difficult and the type of a color image cannot effectively be judged. If a histogram is created for each of the color separations R, G and B, processing time is lengthened and a large memory for storing histograms is needed.
The present invention removes the above-mentioned drawbacks of the prior art. An object of the present invention is to provide an image processing device capable of obtaining, depending on the type of color image, an optimum compression/decompression ratio.
Another object of the present invention is to provide an image processing device capable of identifying the type (characteristics) of color image with accuracy.
In order to achieve the above-mentioned objects in an image processing device which performs image processing according to the type of color image comprises, data compression means having a plurality of different types of data compression algorithms, identification means for identifying the type of a color image on the basis of a distribution of color information which is obtained from respective color separation data of said color image, and switching means for switching said data compression algorithms according to the identification result of said identification means.
In a preferred embodiment, an image processing device further comprises addition means for adding the information indicating the data compression algorithm switched by said switching means in compressed image data by the data compression means.
In a preferred embodiment, an image processing device further comprises storing means for storing image data compressed by said data compression means.
In order to achieve the above-mentioned objects in an image processing device which performs image processing according to the type of color image comprises, extraction means for extracting the color information of respective color separation data of said color image by computing the difference between the maximum value and the minimum value of said respective color separation data, arithmetic means for calculating a histogram of frequency of color information for each color extracted by said extraction means, and identification means for identifying the type of color image on the basis of the histogram of frequency for each color determined by said arithmetic means.
In a preferred embodiment, the identification means identifies the type of color image by the fact of whether or not said histogram of frequency for each color includes a peak greater than a predetermined value.
In a preferred embodiment, the identification means identifies the type of color image by the fact of whether or not the deviation of said histogram of frequency for each color is greater than a predetermined value.
Other features and advantages of the present invention will be apparent from the following description taken in conjunction with the accompanying drawings, in which like reference numerals designate the same or similar parts in the figures thereof.